<!DOCTYPE html>
<html>
<head>
    <title>公众号管理</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<!-- <#if shiro.hasPermission("wechat:wechat:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("wechat:wechat:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if> 
			<#if shiro.hasPermission("wechat:wechat:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>-->
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
											
					<div class="form-group">
                        <div class="col-sm-2 control-label">授权方</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" disabled="disabled" v-model="wechat.nickName" placeholder="授权方"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">授权方头像</div>
                        <div class="col-sm-10">
                        	<img :src="wechat.headImg"  class="layui-upload-img" style="width: 100px;height: 100px;">
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">授权方appid</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" disabled="disabled" v-model="wechat.authorizationAppid" placeholder="授权方appid"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">公众号的主体名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" disabled="disabled" v-model="wechat.principalName" placeholder="公众号的主体名称"/>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <div class="col-sm-2 control-label">状态</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" disabled="disabled" :value="wechat.status == 1 ?'已绑定' : '未绑定'" placeholder="公众号的主体名称"/>
                        </div>
                    </div>
							
			<div class="form-group" v-if="wechat.status!=1">
                 <div class="col-sm-2 control-label"></div>
                 <div v-if="bind">
			         <a :href="url" target="_blank" class="btn btn-primary">一键授权</a>
			     </div>
			     <div v-else>
			         	请稍后重试，正在等待获取微信第三方授权码
			     </div>
                
               <!-- &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="gai"/>  -->
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/wechat/wechat.js?_${.now?long}"></script>
</body>
</html>